﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace KelionesLapai
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            Date.SelectedDate = DateTime.Now.Date;
        }

        private void btnBack_Click(object sender, RoutedEventArgs e)
        {
            Date.SelectedDate = Date.SelectedDate.Value.AddDays(-1);
            setDayName();
        }

        private void btnFoward_Click(object sender, RoutedEventArgs e)
        {
            Date.SelectedDate = Date.SelectedDate.Value.AddDays(1);
            setDayName();
        }

        private void setDayName()
        {
            lbl_DayName.Foreground = new SolidColorBrush(Colors.Black);
             switch (Date.SelectedDate.Value.DayOfWeek)
             {
                 case DayOfWeek.Monday:
                     lbl_DayName.Content = "Pirmadienis";
                     break;
                 case DayOfWeek.Tuesday:
                     lbl_DayName.Content = "Antradienis";
                     break;
                 case DayOfWeek.Wednesday:
                     lbl_DayName.Content = "Trečiadienis";
                     break;
                 case DayOfWeek.Thursday:
                     lbl_DayName.Content = "Ketvirtadienis";
                     break;
                 case DayOfWeek.Friday:
                     lbl_DayName.Content = "Penktadienis";
                     break;
                 case DayOfWeek.Saturday:
                     lbl_DayName.Content = "Šeštadienis";
                     lbl_DayName.Foreground = new SolidColorBrush(Color.FromArgb(255, 80, 38, 226));
                     break;
                 case DayOfWeek.Sunday:
                     lbl_DayName.Content = "Sekmadienis";
                     lbl_DayName.Foreground = new SolidColorBrush(Color.FromArgb(255, 80, 38, 226));
                     break;
             }
        }
    }
}
